from django.urls import path, re_path, include
from web import views
from api import models

urlpatterns = [
    # 拍卖列表
    path('auction/list/', views.auction_data_view, name='auction_list'),
    # 拍卖场添加
    path('auction/add/', views.auction_add_view, name='auction_add'),
    # 拍卖场编辑
    re_path(r'auction/edit/(?P<pk>\d+)/$', views.auction_edit_view, name='auction_edit'),
    # 拍卖场删除
    re_path(r'auction/del/', views.auction_del_view, name='auction_del'),
    # 拍卖品的详细
    re_path(r'auction/item/list/(?P<pk>\d+)/$', views.auction_item_data_view, name='auction_item_list'),
    # 添加专场拍卖品
    re_path(r'auction/item/add/(?P<pk>\d+)/$', views.auction_item_add_view, name='auction_item_add'),
    # 优惠劵列表
    path('coupon/list/', views.coupon_list, name='coupon_list'),
    # 优惠劵添加
    path('coupon/add/', views.coupon_add_view, name='coupon_add'),
    # 优惠劵编辑
    re_path(r'coupon/edit/(?P<pk>\d+)/$', views.coupon_edit_view, name='coupon_edit'),
    # 优惠劵删除
    re_path(r'coupon/del/', views.coupon_del_view, name='coupon_del'),
    # 活动列表
    path('coupon/title/list/', views.coupon_title, name='coupon_title_list'),
    # 活动添加
    path('coupon/title/add/', views.coupon_title_add_view, name='coupon_title_add'),
    # 活动编辑
    re_path(r'coupon/title/edit/(?P<pk>\d+)/$', views.coupon_title_edit_view, name='coupon_title_edit'),
    # 优惠劵删除
    re_path(r'coupon/title/del/', views.coupon_title_del_view, name='coupon_title_del'),
]
